home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Pascal / Snippets / DeepMaskBlitting / Read Me < prev    next >
Encoding:
Text File  |  1997-04-03  |  2.0 KB  |  34 lines  |  [TEXT/ttxt]

  1. DeepMaskBlitting in Pascal
  2. Sorry, only for CodeWarrior! I will try to get it done for TP.
  3. Yes, I know the menu is messed up in the blitter apps. This is just a quick and dirty example!
  4.  
  5. BlitCopy converted by various Pascalites.
  6. MaskCopy from GraphicsBuffers (In C), converted by Matt Formica. Thanks Matt!
  7. Code by Jonathan Apple <KEROI@aol.com>
  8.  
  9. This test is intended for those who already know CopyBits/Mask animation. If you don't understand the basics of this program, I can't help you!
  10.  
  11. NOTE: Blitting is more fragile than CopyBits/Mask. It's like automobiles: the faster you go, the more likely you will have a accident:)
  12. Don't try blitting of the edge of the screen! Do clipping instead! (Don't ask me how...)
  13.  
  14. The code does simple sprite animation. As the tests show, blitting is very fast:)
  15. The code uses Deep Mask Blitting. This is supposedly the *fastest* type of blitter, short of sprite compiling. It uses a lot of memory though; it uses 8-bit offworlds for the masks, instead of 1-bit. So, you must sacrifice memory for speed. I recommend your games use CopyBits as backup, since blitters supposedly don't work with some video card setups. 
  16.  
  17. I am still learning about blitting myself, so I don't know how each line works yet. If you have a problem about the blitting itself, drop me line. If I can't help you, I'll let you know. Again, this shows how blitting is done, not sprite animation. For that, look at other source code. Make sure you check out Pascal Central at http://www.catambay.com/pascal-central/. There is a good Sprite animation engine called Sprite Animation Toolkit, by Ingemar Ragnemalm. I will be putting together my own engine. It will be at http://members.aol.com/keroi/prog.htm
  18. Have fun!
  19.  
  20. Jonathan Apple
  21.  
  22. GO PASCAL! DOWN WITH C!
  23.  
  24.  
  25. ----
  26.  
  27. Hear, hear!
  28.  
  29. I've made some improvements on Jonathan's demo, using CopyBits and CopyMask in
  30. more efficient ways, and even speeding up the custom blitter a little as well.
  31. Test results are included for my 6100/60 and P630.
  32.  
  33. /Ingemar
  34.